package me.firstapp.service.shop;

import java.util.List;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.shop.Category;

public interface CategoryService {

	/**
	 * 新增品类
	 * 
	 * @param name
	 * @param description
	 * @param sort
	 * @param apiClientId
	 * @return
	 */
	Category addCategory(String name, String description, Integer sort, Long apiClientId);

	/**
	 * 更新品类
	 * 
	 * @param categoryId
	 * @param name
	 * @param description
	 * @param sort
	 * @param apiClientId
	 * @return
	 */
	Category updateCategory(Long categoryId, String name, String description, Integer sort, Long apiClientId);

	/**
	 * 通过id查询品类
	 * 
	 * @param categoryId
	 * @param apiClientId
	 * @return
	 */
	Category findCategoryById(Long categoryId, Long apiClientId);

	/**
	 * 获取品类列表
	 * 
	 * @param apiClientId
	 * @return
	 */
	List<Category> findCategories(Long apiClientId);

	/**
	 * 分页查询品类
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param searchParams
	 * @param sortParam
	 * @param sortType
	 * @param apiClientId
	 * @return
	 */
	Page<Category> findSectionPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams, String sortParam,
			String sortType, Long apiClientId);

	/**
	 * 删除
	 * 
	 * @param ids
	 *            多个id时用","隔开
	 */
	void deleteCategorys(String ids, Long apiClientId);
}
